<template>
	<view class="yui-footer-class yui-footer" :class="[fixed?'yui-fixed':'']" :style='{backgroundColor:backgroundColor}'>
		<view class="yui-footer-copyright" :style="{color:color,fontSize:size+'rpx'}">
			{{copyright}}
			<view @click="protocol" class="yui-color-primary" hover-class="tui-opcity">《隐私政策》</view>和<view @click="jumpService" class="yui-color-primary" hover-class="tui-opcity">《服务协议》</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "yuiFooters",
		props: {
	
			copyright: {
				type: String,
				default: "All Rights Reserved."
			},
			//copyright 字体颜色
			color: {
				type: String,
				default: "#A7A7A7"
			},
			//copyright 字体大小
			size: {
				type: Number,
				default: 24
			},
			//footer背景颜色
			backgroundColor: {
				type: String,
				default: "transparent"
			},
			//是否固定在底部
			fixed: {
				type: Boolean,
				default: true
			}
		},
		methods: {
			// #ifndef MP-ALIPAY
			jumpService(){
				uni.navigateTo({
					url:'/pages/login/serviceAgree'
				})
			},
			protocol(){
				uni.navigateTo({
					url:'/pages/login/privacy'
				})
			},
			// #endif
			// #ifdef MP-ALIPAY
			jumpService(){
				uni.navigateTo({
					url:'/pages/login/serviceAgrees'
				})
			},
			protocol(){
				uni.navigateTo({
					url:'/pages/login/privacys'
				})
			},
			// #endif
			
		}
	}
</script>

<style scoped>
	.yui-footer {
		width: 100%;
		overflow: hidden;
		padding: 30rpx 24rpx;
		box-sizing: border-box;
	}

	.yui-fixed {
		position: fixed;
		z-index: 9999;
		bottom: 0;
		left: 0;
	}
    .yui-color-primary{
		color:#ff6919
	}
	.yui-footer-link {
		color: #596d96;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 28rpx;
	}

	.tui-link {
		position: relative;
		padding: 0 18rpx;
		line-height: 1;
	}

	.yui-link::before {
		content: " ";
		position: absolute;
		right: 0;
		top: 0;
		width: 1px;
		bottom: 0;
		border-right: 1px solid #d3d3d3;
		-webkit-transform-origin: 100% 0;
		transform-origin: 100% 0;
		-webkit-transform: scaleX(0.5);
		transform: scaleX(0.5);
	}

	.yui-link:last-child::before {
		border-right: 0 !important
	}

	.yui-link-hover {
		opacity: 0.5
	}

	.yui-footer-copyright {
		font-size: 24rpx;
		color: #A7A7A7;
		line-height: 1;
		text-align: center;
		display: flex;
		padding-top: 16rpx;
		justify-content: center;
		padding-bottom:env(safe-area-inset-bottom);
	}
	
</style>
